class Grade < ActiveRecord::Base
  has_many :routes
 
  def <=>(x)
    self.to_i <=> x.to_i
  end 
  
  def to_uiaa
    self.grade.split("|")[0]
  end
  def to_f
    self.grade.split("|")[1]
  end
  def to_us
    self.grade.split("|")[2]
  end
  def to_i
    self.id
  end
end
